package org.flower.utils;

import org.junit.Test;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

/**
 * @author Aizen
 */
public class MyStringUtil {
    static Date date;
    public static String getOrderId(){
        date = new Date();
        return date.getTime()+"";
    }


    public static List<String> dayDateTime(){
        List<String> list = new ArrayList<>();
        for (int i = 0; i <=7; i++) {
            Calendar   cal   =   Calendar.getInstance();
            cal.add(Calendar.DATE,   -i);
            String yesterday = new SimpleDateFormat( "MM-dd ").format(cal.getTime());
            list.add(yesterday);
        }
        return list;
    }


}
